package com.cy.zs.hp.feign.service;

import com.cy.zs.hp.feign.service.impl.DoctorServiceFB;
import com.cy.zs.hp.model.HisDoctor;
import com.cy.zs.hp.model.SchedulingTable;
import com.cy.zs.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "hp-doctors", fallback = DoctorServiceFB.class)
public interface IHisDoctorFeignService {

    @GetMapping("hp/hisDoctor/{doctorId}")
    JsonResult<HisDoctor> findByDoctorId(@PathVariable Integer doctorId);

    @GetMapping("hp/schedulingTable/{doctorId}/{appointmentTime}")
    JsonResult setdoctor(@PathVariable Integer doctorId, @PathVariable String appointmentTime);
    @GetMapping("hp/schedulingTable/{doctorId}")
    JsonResult<List<SchedulingTable>> findSchedulingTableByDoctorId(@PathVariable Integer doctorId);
    @GetMapping("hp/hisDoctor/findDepartment")
    JsonResult<List<HisDoctor>> findDepartment();
    @GetMapping("hp/hisDoctor/doFindByDepartment/{department}")
    JsonResult<List<HisDoctor>> findByDepartment(@PathVariable String department);//查询对应部门医生
    @RequestMapping("/hp/schedulingTable/doFindByDoctorId/{id}")
    JsonResult<List<SchedulingTable>> findTimesByDoctorId(@PathVariable Integer id);
}
